package com.atguigu.lease.common.util;

import org.checkerframework.checker.units.qual.K;

import java.util.Random;

/**
 * @author Ruchan
 * @title VerifyCodeUtil
 * @date 2024/11/10 16:05
 * @description 
 */
public class VerifyCodeUtil {

    public static String getVerifyCode(Integer length){
        StringBuilder stringBuilder = new StringBuilder();
        Random random = new Random();
        for (int i = 0;i < length;i++){
            int k = random.nextInt(10);
            stringBuilder.append(k);
        }
        return stringBuilder.toString();
    }
}
